home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-20 | 11.7 KB | 221 lines | [TEXT/R*ch] |
- PenRight! Pro
- Bob Besaha
- Strong Software, Inc
- bbesaha@usa.net
-
- ***************************************************************
- Copyright (c) 1995 by Creative Digital Inc. All rights reserved.
- ***************************************************************
-
- Rating 4 (on a five-point scale)
- Pros Quick runtime on 8086-compatible platforms. Easy to use
- visual-programming tools for rapid prototyping. Free 800 number-based
- technical support
- Cons Runtime license fees. No documentation for target platforms. No
- debugging versions of libraries. TSR-based runtime kernel consumes
- 100K of memory. Graffiti support not yet available. No tools provided
- for data transfer to target platforms.
- Cost $700 plus varying runtime license fees.
-
- PenRight! Corporation
- 47358 Blvd., Fremont, CA 94538
- 510.249.6904, 510.249.6920
-
-
- PenRight! Pro is a software development toolkit that lets programmers create
- C-based software for many different MS-DOS based PDAs. It ships with three
- 3.5" diskettes and five manuals: API Reference Guide, Tools User's Guide,
- Learning Guide, PicturePak Sampler, and Application User's Guide. Together,
- these allow developers to create source code and resource files for pen-based
- applications.
- To actually generate executable files and deploy them on a PDA, you need
- several additional items:
-
- * a C compiler (I use Borland C/C++ 4.5);
- * a file transfer mechanism to and from the PDA;
- * PenRight! runtime support files; and
- * extra disk storage on the PDA (PenRight Pro! runtimes ship on SunDisk
- PCMCIA Flash Disk Mass Storage System Cards).
-
- Applications written with the SDK run on IBM PCs and compatibles using
- the mouse as a pen substitute. This lets you do much of your editing,
- compiling, debugging on your desktop system. To deploy PenRight! applications
- on a target PDA, you have to buy a runtime file from PenRight.
-
- Why Yet Another Development Environment?
- PenRight Pro! runs on top of GEOS and other DOS-based operating-system
- kernels. Unfortunately, the GEOS (and most other third-party) applications
- such as Graffiti are not available when running PenRight Pro!. Also,
- switching between the two environments wipes out data in the user's GEOS
- applications. In general, PenRight does not have a strong third-party
- applications development support. In exchange for these limitations, it
- offers several benefits to end user and developer.
- The user gets a much quicker runtime environment. This benefits vertical
- market applications such as field data collection, and is the primary reason
- why I chose PenRight Pro! for my medical software development. Early
- complaints about the Zoomer's speed were a strong, early obstacle to vertical
- market acceptance of that device.
- From the developer's perspective, PenRight Pro! has a significant
- advantage - it's designed specifically for data collection applications. The
- APIs are much sparser than GEOS' and oriented more towards application
- services than system services. This reduces both your learning curve and the
- amount of overhead you must manage in order to create a straightforward
- application. Ultimately, with all visual-style development products, there
- are trade-offs. These trade-offs are quite acceptable when a C programmer can
- produce a simple application in his or her first sitting with PenRight Pro!.
- PenRight! is form-centric, designed to expedite the creation and use of
- data collection forms. The forms you create have the same look and feel that
- the visual development environment - flat and two-dimensional (see Figure 1).
- PenRight! takes the same no-frills, straightforward approach throughout.
-
- The PenRight Pro! APIs
- PenRight Pro! uses a common notational convention of prefixing the name of
- each source code function with three letters identifying the library the
- function or symbol belong to. At the highest level, the program provides
- Windowing, Database, Data Communications, Handwriting, and Forms libraries.
- There are also Field, Font, Control, Initialize/Terminate, List, and Cursor
- lower-level libraries.
- Windows are the primary object for displaying and retrieving data. Window
- functions include modal and modeless windows, with and without adornments
- such as title bars and captions. If you like, you can manage windows at a
- very low-level. There are functions for activation, drawing, pen position
- detection, and clipping management. However, this degree of power adds to the
- complexity and time to development of an application. To simplify the
- developer's job, the windowing functions are used together with the
- Form-management library to expedite the development of dialog style windows.
- Forms are stored as resources in a PenRight Pro! application. They are
- loaded, displayed, activated, and unloaded by the Form management functions.
- While forms can be created dynamically in source code, they are normally
- created with a separate SDK tool.
- Database functions and structures use dBase style files, including
- numeric, character, floating point, logical, date, and memo fields. Records
- are stored in database files and keyed with optional index files. PenRight
- Pro! provides additional structures and functions to move data between
- screens elements and database records.
- Data communication functions include serial data transfer, including
- modem control, and several data transfer protocols, including XModem, YModem,
- and ZModem.
- You can specify handwriting recognition for data entry fields, but there
- is also lower-level access at the source code level. While the company
- recommends that programmers rely on the built in handwriting recognition, the
- manuals acknowledge that certain tasks, such as limiting the set of
- recognizable characters to improve recognition accuracy, are important and
- are available.
- The handwriting recognition runs faster on PenRight Pro! sample
- applications than on GEOS programs. At first glance, the PenRight Pro!
- recognition seems slightly better than GEOS. Conversely, Graffiti is shipping
- for the GEOS environment, and PenRight is not yet compatible with Graffiti.
- This lack of Graffiti support clouds the otherwise clear choice of PenRight
- over GEOS for vertical application development.
- PenRight! has a runtime component consisting of two Terminate and Stay
- Resident (TSR) DOS Programs, "pen!api.exe" and "pen!hwp.exe". The development
- software needs to use these files, so they are loaded first. It's wise to
- have as many of your other drivers in high memory as possible so that the two
- PenRight TSRs do not eat all your base DOS memory. Together, they use about
- 100K.
-
- The Visual Tools
- The PenRight SDK comes with a coherent suite of visual tools that you use to
- create an application, including it's resource files, source code, and make
- files. The top level tool, PenRes, is the workbench that provides access to
- the other tools: the Form editor, Text editor, Canvas (graphics) editor, Font
- editor, and CodeStart.
- You lay out forms using the Form editor. Forms are essentially dialog
- boxes, plus additional objects for text display and entry, buttons, and
- lists. There are a variety of form controls and control options (there could
- be more). A feature that I particularly like in the Form editor is the
- ability to change the orientation of a form from Portrait to Landscape mode.
- After laying out a form in Form edit, you use the workbench to run a
- consistency check to make sure that the application has all the required
- font, graphic, and text resources. This is a great time saver for anyone who
- has experience with missing resources in a Microsoft Windows SDK development
- cycle.
- Next you use CodeStart to create the program's skeleton. CodeStart starts
- with an iconic display of all forms in a project (see Figure 2) plus a Start
- and Stop icon. You establish control flows between forms by clicking and
- dragging between them. If the first icon of a form contains several screen
- elements, such as push-buttons, CodeStart zooms up the full form so you can
- select which screen element to use as the source of the event for that
- particular link.
- You can test applications from within CodeStart by selecting the
- Interpret Scripts command. Using this option you can find a lot of bugs
- before even uploading your program to your target PDA. This is a great time
- saver.
-
- Code Generation
- Once you design your application, you generate its C source code and a
- compiler make file using a single menu command. Although the manuals mention
- earlier versions of the Borland compiler, the make file and source code
- compile perfectly with the latest shipping version (4.5) of Borland's C/C++
- compiler.
- The C code generated is similar to the original APIs for Microsoft
- Windows. CodeStart produces C functions that are event handlers containing
- monolithic case statements. Here's a sample of the code generated by a very
- simple application with a single Exit button, shown in Figure 1.
-
- /* FirstformHandleEvent */
- /*----------------------------------------------------------*/
- BOOLEAN FirstformHandleEvent (EVENTTYPE *event,
- WORD *error)
- { BOOLEAN handled = FALSE;
- *error = 0;
- switch (GetObjectId (event))
- { case Exit:
- handled = FirstformExitButtonHandler
- (event, error);
- break;
- } return (handled);
- }
-
- The FirstformExitButtonHandler is also a case statement:
-
- /* FirstformExitButtonHandler */
- /*----------------------------------------------------------*/
- BOOLEAN FirstformExitButtonHandler (EVENTTYPE *event, WORD *error)
- { BOOLEAN handled = FALSE;
- *error = 0;
- switch (event->eType)
- { case ctlExitEvent:
- Stop ();
- break;
- } return (handled);
- }
-
- Once you compile your application, you transfer it to a PDA. I have
- successfully used both a FlashDisk in an external drive unit on my PC and the
- data transfer software that comes with the GEOS SDK.
-
- Documentation and Support
- The PenRight SDK comes with a Learning Guide that walks you through
- constructing two simple applications. Being new to PDA programming, my goal
- was to get the first sample running on my Zoomer. Unfortunately, the
- PenRight! Pro SDK includes absolutely no information on uploading to your
- PDA. Since PenRight! only recently began supporting GEOS-based PDAs, and a
- new version of their software is near completion, I expect to see more
- documentation about the target platforms in the next release.
- The API Reference Guide is the heart of the documentation. It's thorough
- and full of code examples. There is a function and data structure reference,
- along with a solid overview section.
- The Tool User's Guide covers PenRes, Form Edit, and CodeStart. The manual
- includes a lot of stylistic information that can help you add a professional
- touch to your application's interface.
- The documentation contains no reference literature for any specific PDA.
- I expect at least a bibliography or reference section directing me to the
- appropriate manufacturer's literature. In addition, I would like to see more
- information on what MS DOS support is available.
- The technical support I received from PenRight! Corporation made up for
- the lack of Zoomer specific literature. Getting the sample applications
- running took a brief call to PenRight. The PenRight support staff was very
- responsive - my questions were answered immediately - over an 800 number, to
- boot.
-
- Summary
- PenRight Pro! is a development environment that provides an experienced
- MS-DOS C programmer a quick entry into the PDA development world. It includes
- visual editors for forms management, including layout, flow control, data
- validation, and source code generation. The resultant source code is easy to
- understand, and can be used as a framework for further programmer refinement.
- If your applications need to be developed quickly, and do not need access to
- the host environment on your target PDAs, PenRight Pro! provides a robust,
- fast, and complete solution.
-